package org.ljm.basic.util;

import java.util.List;

import junit.framework.Assert;

import org.ljm.basic.model.User;

public class EntityHelper {

	public static void assertUser(User expected, User actual){
		Assert.assertEquals(expected.getId(), actual.getId());
		Assert.assertEquals(expected.getUsername(), actual.getUsername());
	}
	
	public static void assertUsers(List<User> expected, List<User> actual){
		Assert.assertEquals(expected.size(), actual.size());
		for(int i=0; i<expected.size(); i++)
			assertUser(expected.get(i), actual.get(i));
	}
}
